<!-- page content -->
<div class="right_col" role="main" xmlns:th="http://www.w3.org/1999/xhtml">
	<div class="">
		<div class="page-title">
			<div class="title_left">
				<h3>
					Thymeleaf Index Page
				</h3>
			</div>
		</div>

		<div class="clearfix"></div>

		<h3>This is thymeleaf index page.</h3>
		<p>===========================================</p>
		<h3>th:text</h3>
		<div th:text="${thymeleafTitle}"></div>
		<span th:text="${thymeleafTitle}"></span>
		<p>===========================================</p>
		<h3>th:if,th:unless.</h3>
		<p th:if="${checked} == true">Checked is true</p>
		<p th:unless="${checked} == True">Checked is not ture</p>
		<p th:if="${currentNumber}&lt;100">Current Number less 100</p>
		<p th:if="${thymeleafTitle} == null">Thymeleaf Title is null</p>
		<p>===========================================</p>
		<h3>th:attr</h3>
		<p><input type="checkbox" th:checked="${checked}"></p>
		<p><img th:src="${src}"></p>
		<p><a th:href="${href}">链接</a></p>
		<p><a th:href="@{http://www.baidu.com}">百度</a></p>
		<p><a th:href="@{'/test/city/' + ${city.cityId}}">路径参数</a></p>
		<p><a th:href="@{/test/city(cityId=${city.cityId},cityName=${city.cityName})}">查询参数</a></p>
		<p>===========================================</p>
		<h3>th:object</h3>
		<div th:object="${city}">
			<p>城市id：<span th:text="*{cityId}"></span></p>
			<p>城市名字：<span th:text="${city.cityName}"></span></p>
		</div>
		<p>===========================================</p>
		<h3>th:each</h3>
		<ul th:each="aaa : ${cities}">
			<li th:text="${aaa.cityName}"></li>
		</ul>
		<table>
			<tr><td>ID</td><td>City Name</td></tr>
			<tr th:each="city : ${cities}">
				<td th:text="${city.cityId}"></td>
				<td th:text="${city.cityName}"></td>
			</tr>
		</table>
		<select>
			<option th:each="city : ${cities}" th:value="${city.cityId}" th:text="${city.cityName}"></option>
		</select>
		<p>===========================================</p>
		<h3>th:form</h3>
		<!-- 有的浏览器并不支持 PUT 请求，SpringMVC 为我们提供了一种解决方案
	    	全局配置开启 hidden method：spring.mvc.hiddenmethod.filter.enabled=true
	    	表单中添加 hidden 指定 method
	    -->
		<form action="/api/city" method="post">
			<input type="hidden" name="_method" value="PUT">
			<p>cityId: <input type="text" th:value="${city.cityId}" name="cityId" /></p>
			<p>cityName: <input type="text" th:value="${city.cityName}" name="cityName" /></p>
			<p>localCityName: <input type="text" th:value="${city.localCityName}" name="localCityName"/></p>
			<p><input type="submit" value="Submit" /></p>
		</form>
		<p>===========================================</p>
		<h3>文件上传</h3>
		<p th:text="${message}"></p>
		<form action="/test/file" method="post" enctype="multipart/form-data">
			<input type="file" name="file"/>
			<input type="submit" value="上传文件"/>
		</form>
		<p>===========================================</p>
		<h3>文件下载</h3>
		<p><a href="/test/download?filePath=jjj.jpg">jjj.jpg</a></p>
	</div>
	</div>
</div>
<!-- /page content -->